package com.kingstar.ceres.data.bo;

import com.kingstar.ceres.data.constant.FileImportConstants;
import lombok.Data;

@Data
public class BaseFileMapping{
    //文件ID ---对应文件原始数据库表名
    private String fileId;
    private String fileName;
    private String localPath;
    private String remotePath;
    private String fileType;
    private String connect;
    //文件导入时清除数据策略,0-清除表所有数据 1-清除表当天数据 -1不清除数据  default:clear_all
    private int clearStrategy;
    /**
     * 成功后是否可重复执行 2-不可重复执行 3-可重复执行
     */
    private String canRetry= FileImportConstants.STATUS_SUCCESS;
    private String fileDate;
    /**
     * 插入操作的前置或后置切面,需要预先在项目中定义该bean
     */
    private String insertHolder;

    public BaseFileMapping init(String fileId, String fileName, String localPath, String remotePath, String fileType){
        this.fileId = fileId;
        this.fileName = fileName;
        this.localPath = localPath;
        this.remotePath = remotePath;
        this.fileType = fileType;
        return this;
    }
}